<?php

namespace Modules\Shop\Entities;

use App\User;
use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
//    protected $fillable = [];
    protected $guarded = [];

//    评论表对用户表是多对一关系
    public function lp(){
        return $this->belongsTo(User::class,'user_id','id');
    }

//    评论对文章的关系是多对一
    public function wen(){
        return $this->belongsTo(Article::class,'article_id','id');
    }
}
